import VueRouter from 'vue-router'
import Vue from 'vue'

Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: '/home/main'
    },
    {
        path: '/login',
        component: () => import('@/views/login/UserLogin.vue')

    },
    {
        path: '/home',
        component: () => import('@/views/HomeView.vue'),
        redirect:'/home/main',
        children:[
            {
                path:'main',
                component:()=>import('@/views/home/HomeImage.vue')
            },
            {
                path:'statistics',
                component:()=>import('@/views/user/UserStatistics.vue')
            },
            {
                path:'userInfo',
                component:()=>import('@/views/user/UserInfo.vue')
            },
            {
                path:'dept',
                component:()=>import('@/views/dept/DeptView.vue')
            },
            {
                path:'privateInfo',
                component:()=>import('@/views/user/PrivateInfo.vue')
            },
            {
                path:'job',
                component:()=>import('@/views/dept/JobView.vue')
            },
            {
                path:'loading',
                component:()=>import('@/views/LoadFile.vue')
            }
        ]
    }
]

const router = new VueRouter({
    routes
})

export default router